package org.example.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class CommentVo implements Serializable {
    private Long id;
    private String content;
    private Long createDate;
    @JsonProperty(value = "user")
    private CommentUserVo commentUserVo;
    @JsonInclude(JsonInclude.Include.NON_EMPTY) // 对于集合使用NON_EMPTY
    private List<CommentVo> child;
}
